<template>
    <div>
        <div class="animated fadeInRight">
            <div class="ibox" v-if="labelsData!=null">
                <div class="ibox-title">
                <h3>持续集成汇总</h3>
                </div>
                <div class="ibox-content" id="ibox-content">
                    <steps :common="common" :labelsData="labelsData"></steps>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import { getPMSLink, getHeader } from '@/app.config';
    import info_label from '@/components/devops/info_label.vue';
    import lineChart from '@/components/devops/lineChart.vue';
    import switch_page from '@/components/devops/switch_page.vue';
    import steps from "@/components/devops/steps.vue";
    export default {
        name: "devops",
        components: {
            info_label,
            lineChart,
            switch_page,
            steps
        },
        data() {
            return {
                "common": null,
                "labelsData": null,
                "test1": "linechart1",
                "test2": "linechart2",
                "cols": [ "project", "jobName", "buildNumber", "updateTime"],
                "table_data": [],
                "show_keys": ["project", "jobName", "buildNumber", "updateTime"],
                "labelsMark":["构建得分"],
                "y_keysMark":["mark"]
            }
        },
        methods:{
            update_data:function () {
                console.log("update data");
                this.labelsData = JSON.parse(localStorage.getItem('devops_labels'));
                this.common = JSON.parse(localStorage.getItem('devops_common'));
                console.log("data:");
                console.log(this.labelsData);
                console.log(this.common);
            }
        },
        mounted(){
            this.update_data();
            $("#wizard").steps();
        },
        watch:{
            $route: function(){
                console.log("route chaned")
                window.location.reload();
                window.location.reload();
            }
        }
    }
</script>
<style scoped>
</style>